#pragma once

class cell {
public:
    using cell_state_t = enum {
        ORIGINAL,
        OPENED_BY_PLAYER1,
        OPENED_BY_PLAYER2,
        OPENED_BY_SYSTEM,
    };

    cell() : is_bomb_(false), state_(ORIGINAL), bombs_around_(0) { }

    void set_as_bomb()
    {
        is_bomb_ = true;
    }

    bool is_bomb() const
    {
        return is_bomb_;
    }

    void set_bombs_around(int bombs_around)
    {
        bombs_around_ = bombs_around;
    }

    int bombs_around() const
    {
        return bombs_around_;
    }

    void set_state(cell_state_t state)
    {
        state_ = state;
    }

    cell_state_t state() const
    {
        return state_;
    }

private:
    bool is_bomb_;
    cell_state_t state_;
    int bombs_around_;
};
